package a.f.d.a;

import a.c.ab;
import a.c.bb;
import a.c.e;
import a.c.k;
import a.c.m;
import a.c.n;
import a.c.q;
import a.c.x;
import a.c.z;
import a.f.ad;
import a.f.bd;
import a.f.cd;
import a.f.o;
import a.i.db;
import a.i.wb;

import java.util.*;

public class g
  extends f
{
  private static final double b = 100000.0D;
  private static final double e = 1000.0D;
  private static final double f = 5.0D;
  private static final double g = 0.01D;
  private static final cd h = new cd((byte)2, false);
  private static final cd i = new cd((byte)1, false);
  private static final cd j = new cd((byte)8, false);
  private static final cd k = new cd((byte)4, false);
  private static final cd l = new cd((byte)2, true);
  private static final cd m = new cd((byte)1, true);
  private static final cd o = new cd((byte)8, true);
  private static final cd p = new cd((byte)4, true);
  private static final boolean q = false;
  private double r = 10.0D;
  private double s = 1.0D;
  private double t = 100.0D;
  private x u;
  private boolean v = true;
  public static int w;
  
  public boolean c()
  {
    return this.v;
  }
  
  public void a(boolean paramBoolean)
  {
    this.v = paramBoolean;
  }
  
  public double d()
  {
    return this.s;
  }
  
  public void a(double paramDouble)
  {
    this.s = paramDouble;
  }
  
  public double e()
  {
    return this.r;
  }
  
  public void b(double paramDouble)
  {
    this.r = paramDouble;
  }
  
  public double f()
  {
    return this.t;
  }
  
  public void c(double paramDouble)
  {
    this.t = paramDouble;
  }
  
  private static boolean a(a.c.d paramd, bc parambc)
  {
    return parambc.a(paramd).k();
  }
  
  private static boolean b(a.c.d paramd, bc parambc)
  {
    if (!d.R) {}
    return parambc.a(paramd.e()).h() == parambc.a(paramd.f()).h();
  }
  
  private boolean a(ad paramad)
  {
    boolean bool = d.R;
    int n = b();
    if (!bool) {
      if (n != 2)
      {
        if (bool) {
          break label51;
        }
        if (n != 0) {
          break label50;
        }
      }
    }
    if (!bool) {
      if (!paramad.a(1))
      {
        if (bool) {
          break label94;
        }
        if (!paramad.a(2))
        {
          label50:
          label51:
          if ((!bool) && ((n != 1) && ((!bool) && (n != 3)))) {
            break label97;
          }
          if (bool) {
            break label94;
          }
          if (!paramad.a(8)) {
            if (bool) {
              break label94;
            }
          }
        }
      }
    }
    label94:
    label97:
    return paramad.a(4);
  }
  
  private boolean a(boolean paramBoolean, ad paramad)
  {
    boolean bool = d.R;
    if (!bool) {}
    if (!bool) {}
    return !paramad.a(c(!paramBoolean));
  }
  
  private static int a(byte paramByte, boolean paramBoolean)
  {
    boolean bool = d.R;
    if (!bool) {
      if (!paramBoolean)
      {
        if (!bool) {
          switch (paramByte)
          {
          case 0: 
          default: 
            return 1;
          case 2: 
            return 2;
          case 1: 
            return 8;
          }
        }
        return 4;
      }
    }
    if (!bool) {
      switch (paramByte)
      {
      case 0: 
      default: 
        return 2;
      case 2: 
        return 1;
      case 1: 
        return 4;
      }
    }
    return 8;
  }
  
  private boolean b(boolean paramBoolean, ad paramad)
  {
    return paramad.a(a(b(), paramBoolean));
  }
  
  private static boolean a(e parame, k paramk)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    Object localObject = null;
    m localm = parame.n();
    label86:
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        ad localad = (ad)paramk.get(localm.a().f());
        if (!bool2)
        {
          if (localad != null)
          {
            if (!bool2) {
              if (localObject != null)
              {
                if (bool2) {
                  break label86;
                }
                if (localObject.a() != localad.a()) {
                  return false;
                }
              }
            }
            localObject = localad;
          }
          localm.f();
        }
      } while (!bool1);
    } while (bool2);
    return true;
  }
  
  private boolean a(e parame, k paramk, int paramInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    HashSet localHashSet = new HashSet(8);
    m localm = parame.n();
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        ad localad = (ad)paramk.get(localm.a().f());
        if (!bool2)
        {
          if (localad != null)
          {
            int n = localad.b(b());
            if (!bool2) {
              if ((paramInt & n) != 0) {
                localHashSet.add(localad);
              }
            }
            if (bool2) {
              continue;
            }
            if (localHashSet.size() > 1) {
              return true;
            }
          }
          localm.f();
        }
      } while (!bool1);
    } while (bool2);
    return false;
  }
  
  private static boolean b(ad paramad)
  {
    boolean bool = d.R;
    int n = paramad.a();
    if (!bool) {
      if (n != 4)
      {
        if (bool) {
          break label47;
        }
        if (n != 8)
        {
          if (bool) {
            break label47;
          }
          if (n != 1) {
            if (bool) {
              break label47;
            }
          }
        }
      }
    }
    label47:
    return n == 2;
  }
  
  private double a(ad paramad, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4)
  {
    boolean bool = d.R;
    double d = paramad.b() ? 0.5D : 0.0D;
    if (!bool) {
      if (paramBoolean3)
      {
        if (!bool) {}
        if (!bool) {
          if (b(!paramBoolean4, paramad)) {
            return d + 2.0D;
          }
        }
        if (b(paramBoolean4, paramad)) {
          return d + 4.0D;
        }
        return d;
      }
    }
    if (!bool) {
      if (a(paramBoolean1, paramad))
      {
        if (!bool) {}
        return d + (paramBoolean2 ? 3 : 5) + 6.0D * d();
      }
    }
    if (b(paramBoolean1, paramad)) {
      return d;
    }
    return d + 1.0D;
  }
  
  private boolean a(ad paramad, cd paramcd, a.d.w paramw)
  {
    boolean bool = d.R;
    byte b1 = b();
    if (!bool) {
      if (!paramcd.g())
      {
        if (bool) {
          break label47;
        }
        if (paramad.b(b1) != paramcd.b()) {
          return false;
        }
      }
    }
    label47:
    if (!bool) {
      if (paramcd.a())
      {
        int n = a();
        if ((bool) || (paramad.a(b1, n) - paramw.a() < 0.01D)) {
          if (bool) {}
        }
        return paramad.b(b1, n) - paramw.b() < 0.01D;
      }
    }
    return true;
  }
  
  private void a(e parame, o paramo, bc parambc, rb paramrb)
  {
    boolean bool8 = d.R;
    boolean bool7 = d.Q;
    q localq = new q();
    e locale1 = localq.i();
    e locale2 = localq.i();
    n localn1 = db.b();
    n localn2 = db.b();
    x localx = db.a();
    k localk = paramo.c(bd.a);
    bb localbb = new bb();
    Object localObject3;
    Object localObject4;
    if (((bool8) || (localk != null)) && ((bool8) || (localk.get(parame) != null)))
    {
      localObject1 = (bd)localk.get(parame);
      localObject2 = ((bd)localObject1).b();
      do
      {
        if (!((Iterator)localObject2).hasNext()) {
          break;
        }
        localObject3 = (bd.e_)((Iterator)localObject2).next();
        localObject4 = localq.i();
        localx.a(localObject4, ((bd.e_)localObject3).a());
        localbb.add(localObject4);
        a.c.d locald1 = localq.a((e)localObject4, locale2);
        localn1.a(locald1, ((bd.e_)localObject3).b());
        if (!bool8)
        {
          if (bool7) {
            break label241;
          }
          localn2.a(locald1, Math.min(1000.0D, 6.0D * (1.0D + ((bd.e_)localObject3).a().f())));
        }
      } while (!bool7);
    }
    label241:
    Object localObject1 = db.b();
    Object localObject2 = parame.l();
    Object localObject5;
    boolean bool5;
    Object localObject6;
    Object localObject7;
    label698:
    label713:
    label721:
    label881:
    label893:
    do
    {
      do
      {
        if (!((m)localObject2).e()) {
          break label910;
        }
        localObject3 = ((m)localObject2).a();
        localObject4 = parambc.a((a.c.d)localObject3);
        bool1 = a((a.c.d)localObject3, parambc);
        boolean bool2 = ((a.c.d)localObject3).e().equals(parame);
        boolean bool3 = b((a.c.d)localObject3, parambc);
        boolean bool4 = parambc.a((a.c.d)localObject3).n();
        a.c.d locald3;
        HashMap localHashMap;
        Object localObject8;
        Object localObject9;
        Object localObject10;
        do
        {
          localObject5 = bool2 ? ((y)localObject4).e() : ((y)localObject4).g();
          if ((bool8) || (localObject5 != null)) {
            if (bool8) {}
          }
          bool5 = !((Collection)localObject5).isEmpty();
          if ((bool8) || (localbb.isEmpty()))
          {
            if (bool8) {
              break label907;
            }
            if (!bool5) {
              break label893;
            }
          }
          localObject6 = localq.i();
          ((n)localObject1).a(localObject3, localObject6);
          localObject7 = localq.a(locale1, (e)localObject6);
          localn1.a(localObject7, 1);
          localn2.a(localObject7, 0.0D);
          locald3 = localq.a((e)localObject6, locale2);
          localn1.a(locald3, 1);
          localn2.a(locald3, 100000.0D);
          localHashMap = new HashMap();
          if (bool8) {
            break label713;
          }
          if (bool5)
          {
            localObject8 = ((Collection)localObject5).iterator();
            do
            {
              if (!((Iterator)localObject8).hasNext()) {
                break label698;
              }
              localObject9 = (ad)((Iterator)localObject8).next();
              localObject10 = (e)localHashMap.get(e_.a((ad)localObject9));
              if (bool7) {
                break;
              }
              if (localObject10 == null)
              {
                localObject10 = localq.i();
                localHashMap.put(e_.a((ad)localObject9), localObject10);
                localx.a(localObject10, localObject9);
                locald3 = localq.a((e)localObject10, locale2);
                localn1.a(locald3, 2147483647);
                double d3 = Math.min(1000.0D, 6.0D * (1.0D + ((ad)localObject9).f()));
                localn2.a(locald3, d3);
              }
              locald3 = localq.a((e)localObject6, (e)localObject10);
              localn1.a(locald3, 1);
              localn2.a(locald3, Math.min(1000.0D, a((ad)localObject9, bool2, bool1, bool3, bool4)));
            } while (!bool7);
          }
          if (bool8) {
            break label721;
          }
        } while (bool8);
        if (!localbb.isEmpty())
        {
          localObject8 = localbb.l();
          do
          {
            if (!((a.c.w)localObject8).e()) {
              break label893;
            }
            localObject9 = ((a.c.w)localObject8).d();
            localObject10 = (ad)localx.get(localObject9);
            e locale3 = (e)localHashMap.get(e_.a((ad)localObject10));
            if (bool7) {
              break;
            }
            if (bool5)
            {
              if (!bool8) {
                if (locale3 == null) {
                  break label881;
                }
              }
            }
            else
            {
              locald3 = localq.a((e)localObject6, (e)localObject9);
              localn1.a(locald3, 1);
              localn2.a(locald3, Math.min(1000.0D, a((ad)localObject10, bool2, bool1, bool3, bool4)));
              if (bool8) {
                continue;
              }
            }
            if (locale3 != null)
            {
              if (bool8) {
                continue;
              }
              if (localq.h(locale3)) {
                localq.a(locale3);
              }
            }
            ((a.c.w)localObject8).f();
          } while (!bool7);
        }
        ((m)localObject2).f();
      } while (bool8);
    } while (!bool7);
    label907:
    label910:
    localObject2 = db.b();
    a.a.w.a(localq, locale1, locale2, localn1, localn2, (n)localObject2, null);
    byte b1 = b();
    int n = a();
    boolean bool1 = true;
    ArrayList localArrayList = new ArrayList();
    m localm = parame.l();
    label1196:
    label1201:
    label1349:
    label1382:
    label1396:
    do
    {
      do
      {
        if (!localm.e()) {
          break label1399;
        }
        a.c.d locald2 = localm.a();
        localObject5 = (e)((n)localObject1).get(locald2);
        if (bool7) {
          break label1435;
        }
        if ((bool8) || (localObject5 != null))
        {
          bool5 = locald2.e().equals(parame);
          localObject6 = ((e)localObject5).n();
          do
          {
            if (!((m)localObject6).e()) {
              break label1382;
            }
            if (bool7) {
              break;
            }
            if (((n)localObject2).getInt(((m)localObject6).a()) > 0)
            {
              if (!bool8)
              {
                if (localn2.getDouble(((m)localObject6).a()) < 100000.0D)
                {
                  localObject7 = (ad)localx.get(((m)localObject6).a().f());
                  localArrayList.add(localObject7);
                  if (!bool8) {
                    if (!a(bool5, (ad)localObject7))
                    {
                      if (!bool8) {
                        if (b((ad)localObject7))
                        {
                          if (bool8) {
                            break label1201;
                          }
                          if (a((e)localObject5, localx)) {
                            break label1196;
                          }
                        }
                      }
                      if (bool8) {
                        break label1396;
                      }
                      if (!b(locald2, parambc)) {
                        break label1382;
                      }
                      if (bool8) {
                        break label1396;
                      }
                      if (!a((ad)localObject7)) {
                        break label1382;
                      }
                    }
                  }
                  if ((bool8) || (((ad)localObject7).b())) {
                    if (bool8) {}
                  }
                  boolean bool6 = !a((e)localObject5, localx, ((ad)localObject7).b(b1));
                  if (!bool8)
                  {
                    if (bool6)
                    {
                      double d1 = ((ad)localObject7).a(b1, n);
                      double d2 = ((ad)localObject7).b(b1, n);
                      if (!bool8)
                      {
                        if (bool5) {
                          paramo.a(locald2, new a.d.w(d1, d2));
                        }
                      }
                      else
                      {
                        if (bool8) {
                          break label1349;
                        }
                        if (!bool7) {
                          break label1325;
                        }
                      }
                      paramo.b(locald2, new a.d.w(d1, d2));
                    }
                    paramrb.a(locald2, bool5, a((ad)localObject7, bool5, bool6));
                  }
                  if (bool8) {
                    break label1396;
                  }
                  if (!bool7) {
                    break label1382;
                  }
                }
                bool1 = false;
              }
              if (bool8) {
                break label1396;
              }
              if (!bool7) {
                break label1382;
              }
            }
            ((m)localObject6).f();
          } while (!bool7);
        }
        localm.f();
      } while (bool8);
    } while (!bool7);
    label1325:
    label1399:
    if (!bool8) {
      if (!bool8)
      {
        if (!bool1)
        {
          if (bool8) {
            break label1440;
          }
          this.u.a(parame, null);
        }
      }
      else if (!bool7) {
        return;
      }
    }
    label1435:
    label1440:
    this.u.a(parame, localArrayList);
  }
  
  public void a(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.u = db.a();
    a.c.w localw = paramo.v();
    do
    {
      while (!bool1)
      {
        if (!localw.e()) {
          break;
        }
        a(localw.d(), paramo, parambc, paramrb);
        localw.f();
      }
    } while (bool2);
  }
  
  private static boolean a(cd paramcd)
  {
    boolean bool = d.R;
    return ((bool) || (paramcd != null)) && (((!bool) && (paramcd == m)) || ((!bool) && (paramcd == i)) || ((!bool) && (paramcd == l)) || ((!bool) && (paramcd == h)) || ((!bool) && (paramcd == o)) || ((!bool) && (paramcd == j)) || ((bool) || ((paramcd == p) || (paramcd == k))));
  }
  
  protected k a(o paramo)
  {
    return paramo.c(bd.a);
  }
  
  private static bd.d_ a(k paramk, e parame)
  {
    boolean bool = d.R;
    if (!bool) {
      if (paramk == null) {
        return null;
      }
    }
    bd localbd = (bd)paramk.get(parame);
    if (!bool) {}
    return localbd == null ? null : localbd.c();
  }
  
  protected void a(e parame, Comparator paramComparator1, Comparator paramComparator2, o paramo, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (!bool2) {
      if (parame.c() == 0) {
        return;
      }
    }
    int n = 0;
    int i1 = 0;
    Object localObject1 = parame.l();
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      localObject3 = ((a.c.d)localObject2).f().equals(parame) ? parambc.a((a.c.d)localObject2).g() : parambc.a((a.c.d)localObject2).e();
      if (!bool2)
      {
        if (localObject3 != null)
        {
          int i2 = ((Collection)localObject3).size();
          n += i2;
          if (bool2) {
            continue;
          }
          if (i2 > 1) {
            i1 += i2 - 1;
          }
        }
        ((m)localObject1).f();
      }
    } while (!bool1);
    localObject1 = new ab(parame.m()).p();
    l.a((Object[])localObject1, paramComparator1);
    Object localObject2 = new ab(parame.n());
    ((ab)localObject2).a(paramComparator2);
    ((ab)localObject2).j();
    Object localObject3 = ((ab)localObject2).p();
    ArrayList[] arrayOfArrayList;
    Object localObject4;
    if (!bool2) {
      if ((n == 0) && ((bool2) || (this.u != null)) && ((bool2) || (this.u.get(parame) != null)))
      {
        Collection localCollection = (Collection)this.u.get(parame);
        if (!bool2) {
          if (localCollection.size() != parame.c()) {
            return;
          }
        }
        arrayOfArrayList = new ArrayList[4];
        int i4 = 0;
        do
        {
          while (!bool1)
          {
            if (i4 >= 4) {
              break;
            }
            arrayOfArrayList[i4] = new ArrayList();
            i4++;
          }
        } while (bool2);
        localObject4 = new z();
        Iterator localIterator1 = localCollection.iterator();
        if (localIterator1.hasNext()) {}
        label424:
        while (bool2)
        {
          ad localad = (ad)localIterator1.next();
          if (bool1) {
            break label439;
          }
          if (b(localad))
          {
            i7 = a(1, 2, 1, 4, 8, 2, localad);
            arrayOfArrayList[i7].add(localad);
            if (bool2) {
              break label424;
            }
            if (!bool1) {
              break;
            }
          }
          ((z)localObject4).add(localad);
          if (!bool1) {
            break;
          }
        }
        label439:
        int i5 = arrayOfArrayList[3].size();
        int i6 = arrayOfArrayList[1].size();
        int i7 = localObject1.length - arrayOfArrayList[0].size();
        if (i7 > 0) {}
        label532:
        label537:
        while (bool2)
        {
          if (bool1) {
            break label550;
          }
          if (!((z)localObject4).isEmpty())
          {
            arrayOfArrayList[0].add(((z)localObject4).b());
            if (bool2) {
              break label537;
            }
            if (!bool1) {}
          }
          else
          {
            if (!bool2)
            {
              if (i5 > i6) {
                i5--;
              }
            }
            else
            {
              if (bool2) {
                break label537;
              }
              if (!bool1) {
                break label532;
              }
            }
            i6--;
          }
          i7--;
          if (!bool1) {
            break;
          }
        }
        if (!((z)localObject4).isEmpty()) {
          label550:
          arrayOfArrayList[2].addAll((Collection)localObject4);
        }
        i7 = 0;
        do
        {
          do
          {
            if (i7 >= arrayOfArrayList.length) {
              break;
            }
            Collections.sort(arrayOfArrayList[i7], new b_(i7));
            i7++;
            if (bool2) {
              break label620;
            }
            if (bool1) {
              break label618;
            }
          } while (!bool1);
        } while (bool2);
        i7 = 0;
        label618:
        label620:
        int i8 = i5;
        if (i8 < arrayOfArrayList[3].size())
        {
          a(paramo, localObject1[(i7++)], (ad)arrayOfArrayList[3].get(i8), false, paramrb);
          i8++;
        }
        int i9;
        for (;;)
        {
          if (!bool2) {
            if (!bool1)
            {
              if (!bool1) {
                break;
              }
              if (bool2) {
                continue;
              }
              Iterator localIterator2 = arrayOfArrayList[0].iterator();
              do
              {
                do
                {
                  if (!localIterator2.hasNext()) {
                    break;
                  }
                  a(paramo, localObject1[(i7++)], (ad)localIterator2.next(), false, paramrb);
                } while (!bool1);
              } while (bool2);
              i9 = 0;
            }
          }
        }
        int i10;
        do
        {
          do
          {
            if (i7 >= localObject1.length) {
              break;
            }
            a(paramo, localObject1[(i7++)], (ad)arrayOfArrayList[1].get(i9++), false, paramrb);
          } while (!bool1);
          i10 = 0;
        } while (bool2);
        int i11 = i9;
        do
        {
          while (!bool1)
          {
            if (i11 >= arrayOfArrayList[1].size()) {
              break;
            }
            a(paramo, localObject3[(i10++)], (ad)arrayOfArrayList[1].get(i11), true, paramrb);
            i11++;
          }
        } while (bool2);
        Iterator localIterator3 = arrayOfArrayList[2].iterator();
        do
        {
          do
          {
            if (!localIterator3.hasNext()) {
              break;
            }
            a(paramo, localObject3[(i10++)], (ad)localIterator3.next(), true, paramrb);
            if (bool2) {
              break label938;
            }
            if (bool1) {
              break label931;
            }
          } while (!bool1);
        } while (bool2);
        localIterator3 = arrayOfArrayList[3].iterator();
        label931:
        label938:
        do
        {
          while (!bool1)
          {
            if (!localIterator3.hasNext()) {
              break;
            }
            if (!bool2)
            {
              if (i10 >= localObject3.length) {
                break;
              }
              a(paramo, localObject3[(i10++)], (ad)localIterator3.next(), true, paramrb);
            }
          }
        } while (bool2);
        return;
      }
    }
    if ((bool2) || (i1 <= 0))
    {
      if (bool2) {
        break label1034;
      }
      if (n == parame.c()) {}
    }
    else
    {
      a(parame, (a.c.d[])localObject1, (a.c.d[])localObject3, paramo, parambc, paramrb);
      return;
    }
    label1034:
    if ((bool2) || (n > 0))
    {
      int i3 = 0;
      do
      {
        do
        {
          if (i3 >= localObject1.length) {
            break;
          }
          arrayOfArrayList = localObject1[i3];
          localObject4 = (ArrayList)parambc.a(arrayOfArrayList).g();
          if (bool1) {
            break label1174;
          }
          if (localObject4 != null)
          {
            if (bool2) {
              continue;
            }
            if (((ArrayList)localObject4).size() > 0) {
              a(paramo, arrayOfArrayList, (ad)((ArrayList)localObject4).get(0), false, paramrb);
            }
          }
          i3++;
        } while (!bool1);
      } while (bool2);
      i3 = 0;
      label1174:
      do
      {
        if (i3 >= localObject3.length) {
          break;
        }
        arrayOfArrayList = localObject3[i3];
        localObject4 = (ArrayList)parambc.a(arrayOfArrayList).e();
        if (localObject4 != null)
        {
          if (bool2) {
            continue;
          }
          if (((ArrayList)localObject4).size() > 0) {
            a(paramo, arrayOfArrayList, (ad)((ArrayList)localObject4).get(0), true, paramrb);
          }
        }
        i3++;
      } while (!bool1);
    }
  }
  
  private void a(e parame, a.c.d[] paramArrayOfd1, a.c.d[] paramArrayOfd2, o paramo, bc parambc, rb paramrb)
  {
    boolean bool5 = d.R;
    boolean bool4 = d.Q;
    q localq = new q();
    a.c.d[] arrayOfd1 = new a.c.d[paramArrayOfd1.length + paramArrayOfd2.length];
    System.arraycopy(paramArrayOfd1, 0, arrayOfd1, 0, paramArrayOfd1.length);
    System.arraycopy(paramArrayOfd2, 0, arrayOfd1, paramArrayOfd1.length, paramArrayOfd2.length);
    int n = c(true);
    int i1 = c(false);
    n localn1 = localq.C();
    a.c.d[] arrayOfd2 = new a.c.d[arrayOfd1.length];
    x localx1 = localq.B();
    HashMap localHashMap = new HashMap();
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new ArrayList();
    k localk = a(paramo);
    Object localObject2;
    Object localObject4;
    if (!bool5) {
      if (localk != null)
      {
        if (bool5) {
          break label288;
        }
        localObject1 = (bd)localk.get(parame);
        if (localObject1 != null)
        {
          localObject2 = ((bd)localObject1).b();
          do
          {
            do
            {
              do
              {
                if (!((Iterator)localObject2).hasNext()) {
                  break;
                }
                localObject3 = (bd.e_)((Iterator)localObject2).next();
              } while (localHashMap.get(e_.a(((bd.e_)localObject3).a())) != null);
              localObject4 = localq.i();
              localHashMap.put(e_.a(((bd.e_)localObject3).a()), localObject4);
              if (!bool5)
              {
                if ((bool5) || (bool4)) {
                  break label289;
                }
                localx1.a(localObject4, localObject3);
                localArrayList2.add(localObject4);
                localArrayList1.add(localObject3);
              }
            } while (bool5);
          } while (!bool4);
        }
      }
    }
    label288:
    label289:
    Object localObject1 = a(localk, parame);
    label484:
    Object localObject7;
    if (localObject1 != null)
    {
      localObject2 = new ab(arrayOfd1);
      ((ab)localObject2).a(new d_(parame, parambc, null));
      localObject3 = ((ab)localObject2).l();
      label538:
      label555:
      do
      {
        if (!((m)localObject3).e()) {
          break;
        }
        localObject4 = ((m)localObject3).a();
        boolean bool2 = ((a.c.d)localObject4).f().equals(parame);
        y localy2 = parambc.a((a.c.d)localObject4);
        if (bool4) {
          break label679;
        }
        localObject5 = bool2 ? localy2.g() : localy2.e();
        if (!bool5)
        {
          if (localObject5 != null)
          {
            if (bool5) {
              continue;
            }
            if (!((Collection)localObject5).isEmpty())
            {
              if (!bool5) {
                if (bool2)
                {
                  if (bool5) {
                    break label484;
                  }
                  if (a(localy2.f()))
                  {
                    i4 = c(localy2.f().b());
                    if ((!bool5) && (!bool4)) {
                      break label555;
                    }
                  }
                }
              }
              if (!bool5) {
                if (!bool2)
                {
                  if (bool5) {
                    break label538;
                  }
                  if (a(localy2.d()))
                  {
                    i4 = c(localy2.d().b());
                    if ((!bool5) && (!bool4)) {
                      break label555;
                    }
                  }
                }
              }
              if (!bool5) {}
              i4 = bool2 ? n : i1;
              if (!bool5) {}
              localObject6 = ((bd.d_)localObject1).a((a.c.d)localObject4, !bool2, i4);
              if (bool5) {
                continue;
              }
              if (localHashMap.get(e_.a(((bd.e_)localObject6).a())) == null)
              {
                localObject7 = localq.i();
                localHashMap.put(e_.a(((bd.e_)localObject6).a()), localObject7);
                localx1.a(localObject7, localObject6);
                localArrayList2.add(localObject7);
                localArrayList1.add(localObject6);
              }
            }
          }
          ((m)localObject3).f();
        }
      } while (!bool4);
    }
    label679:
    int i2 = 0;
    label774:
    label828:
    label845:
    label847:
    Object localObject8;
    label1021:
    do
    {
      if (i2 >= arrayOfd1.length) {
        break;
      }
      localObject3 = arrayOfd1[i2];
      boolean bool1 = ((a.c.d)localObject3).f().equals(parame);
      y localy1 = parambc.a((a.c.d)localObject3);
      if (bool4) {
        break label1167;
      }
      if (bool1)
      {
        if (bool5) {
          break label774;
        }
        if (a(localy1.f()))
        {
          i3 = c(localy1.f().b());
          if (bool5) {
            break label847;
          }
          if (!bool4) {
            break label845;
          }
        }
      }
      if (!bool5) {
        if (!bool1)
        {
          if (bool5) {
            break label828;
          }
          if (a(localy1.d()))
          {
            i3 = c(localy1.d().b());
            if (bool5) {
              break label847;
            }
            if (!bool4) {
              break label845;
            }
          }
        }
      }
      if (!bool5) {}
      int i3 = bool1 ? n : i1;
      localObject5 = bool1 ? localy1.g() : localy1.e();
      i4 = 0;
      if ((bool5) || (localObject5 != null))
      {
        if (bool5) {
          break label1021;
        }
        if (((Collection)localObject5).size() > 0)
        {
          localObject6 = ((Collection)localObject5).iterator();
          do
          {
            do
            {
              if (!((Iterator)localObject6).hasNext()) {
                break;
              }
              do
              {
                localObject7 = (ad)((Iterator)localObject6).next();
                if (!((ad)localObject7).a(i3)) {
                  break;
                }
                i4++;
              } while ((bool5) || (bool4));
            } while (localHashMap.get(e_.a((ad)localObject7)) != null);
            localObject8 = localq.i();
            localHashMap.put(e_.a((ad)localObject7), localObject8);
            localx1.a(localObject8, localObject7);
            localArrayList2.add(localObject8);
          } while ((!bool5) && (!bool4));
        }
      }
      if (!bool5)
      {
        if (i4 == 0)
        {
          if (bool5) {
            continue;
          }
          if (localArrayList1.isEmpty())
          {
            localObject6 = localq.i();
            if (!bool5) {}
            localObject7 = ad.b(bool1 ? n : i1);
            localHashMap.put(e_.a((ad)localObject7), localObject6);
            localx1.a(localObject6, localObject7);
            localArrayList2.add(localObject6);
            localObject8 = localq.a((e)localObject6, (e)localObject6);
            localn1.a(localObject8, 0.0D);
            arrayOfd2[i2] = localObject8;
          }
        }
        i2++;
      }
    } while (!bool4);
    Collections.sort(localArrayList2, new c_(localx1));
    label1167:
    e[] arrayOfe = new e[localArrayList2.size()];
    localArrayList2.toArray(arrayOfe);
    Object localObject3 = new e[arrayOfd1.length];
    int[] arrayOfInt = new int[localq.j()];
    double d1 = 0.0D;
    Object localObject5 = new a.c.d[arrayOfd1.length][];
    int i4 = 0;
    label1311:
    label1365:
    label1382:
    Object localObject10;
    label1631:
    do
    {
      if (i4 >= arrayOfd1.length) {
        break;
      }
      if (bool5) {
        break label1968;
      }
      localObject6 = arrayOfd1[i4];
      boolean bool3 = ((a.c.d)localObject6).f().equals(parame);
      localObject8 = parambc.a((a.c.d)localObject6);
      if (bool4) {
        break label1965;
      }
      if (bool3)
      {
        if (bool5) {
          break label1311;
        }
        if (a(((y)localObject8).f()))
        {
          i6 = c(((y)localObject8).f().b());
          if ((!bool5) && (!bool4)) {
            break label1382;
          }
        }
      }
      if (!bool5) {
        if (!bool3)
        {
          if (bool5) {
            break label1365;
          }
          if (a(((y)localObject8).d()))
          {
            i6 = c(((y)localObject8).d().b());
            if ((!bool5) && (!bool4)) {
              break label1382;
            }
          }
        }
      }
      if (!bool5) {}
      int i6 = bool3 ? n : i1;
      localObject10 = localq.i();
      localObject3[i4] = localObject10;
      double d2 = 1.7976931348623157E+308D;
      Collection localCollection = bool3 ? ((y)localObject8).g() : ((y)localObject8).e();
      int i7 = 0;
      Object localObject12;
      e locale1;
      a.c.d locald;
      double d3;
      e locale2;
      if (((bool5) || (localCollection != null)) && ((bool5) || (localCollection.size() > 0)))
      {
        Iterator localIterator = localCollection.iterator();
        do
        {
          do
          {
            do
            {
              do
              {
                if (!localIterator.hasNext()) {
                  break;
                }
                localObject12 = (ad)localIterator.next();
              } while (!((ad)localObject12).a(i6));
              i7 = 1;
              locale1 = (e)localHashMap.get(e_.a((ad)localObject12));
              locald = localq.a(locale1, (e)localObject10);
              d3 = ((ad)localObject12).f();
              localn1.a(locald, d3);
              if (bool5) {
                break;
              }
              if (bool4) {
                break label1631;
              }
            } while (d3 >= d2);
            if (!bool5) {
              if (arrayOfd2[i4] != null)
              {
                locale2 = arrayOfd2[i4].e();
                arrayOfInt[locale2.f()] -= 1;
              }
            }
            arrayOfd2[i4] = locald;
            d2 = d3;
            arrayOfInt[locale1.f()] += 1;
          } while (bool5);
        } while (!bool4);
      }
      if (i7 == 0)
      {
        int i8 = 0;
        do
        {
          if (i8 >= localArrayList1.size()) {
            break;
          }
          localObject12 = ((bd.e_)localArrayList1.get(i8)).a();
          if (bool4) {
            break label1818;
          }
          if (((ad)localObject12).a(i6))
          {
            i7 = 1;
            locale1 = (e)localHashMap.get(e_.a((ad)localObject12));
            locald = localq.a(locale1, (e)localObject10);
            d3 = ((ad)localObject12).f();
            localn1.a(locald, d3);
            if (bool5) {
              continue;
            }
            if (d3 < d2)
            {
              if (!bool5) {
                if (arrayOfd2[i4] != null)
                {
                  locale2 = arrayOfd2[i4].e();
                  arrayOfInt[locale2.f()] -= 1;
                }
              }
              arrayOfd2[i4] = locald;
              d2 = d3;
              arrayOfInt[locale1.f()] += 1;
            }
          }
          i8++;
        } while (!bool4);
        if (bool5) {
          break label1884;
        }
        if (i7 == 0)
        {
          localObject11 = arrayOfd2[i4].e();
          localObject12 = arrayOfd2[i4];
          localq.a((a.c.d)localObject12, (e)localObject11, (e)localObject10);
          localn1.a(localObject12, 0.0D);
          d2 = 0.0D;
          arrayOfInt[localObject11.f()] = 1;
        }
      }
      localObject5[i4] = new a.c.d[((e)localObject10).d()];
      Object localObject11 = ((e)localObject10).i();
      int i9 = 0;
      if (i9 < localObject5[i4].length)
      {
        localObject5[i4][i9] = localObject11;
        i9++;
        localObject11 = ((a.c.d)localObject11).j();
      }
      for (;;)
      {
        if (!bool5) {
          if (!bool4)
          {
            if (!bool4) {
              break;
            }
            d1 += d2;
            if (bool5) {
              continue;
            }
            i4++;
          }
        }
      }
    } while (!bool4);
    label1818:
    label1884:
    x localx2 = db.a(new Object[localq.k()]);
    label1965:
    label1968:
    Object localObject6 = db.a(new int[localq.k()]);
    x localx3 = db.a(new int[localq.k()]);
    int i5 = 0;
    do
    {
      if (i5 >= arrayOfe.length) {
        break;
      }
      localObject9 = arrayOfe[i5];
      localObject10 = localx1.get(localObject9);
      if (bool4) {
        break label2137;
      }
      if ((localObject10 instanceof bd.e_))
      {
        bd.e_ locale_ = (bd.e_)localObject10;
        localx2.a(localObject9, locale_.a());
        ((x)localObject6).a(localObject9, locale_.b());
        if (bool5) {
          continue;
        }
        if (!bool4) {}
      }
      else
      {
        localx2.a(localObject9, localObject10);
        ((x)localObject6).a(localObject9, 2147483647);
      }
      localx3.a(arrayOfe[i5], i5);
      i5++;
    } while (!bool4);
    label2137:
    n localn2 = db.b(new double[localq.m()]);
    Object localObject9 = localq.w();
    do
    {
      if (!((m)localObject9).e()) {
        break;
      }
      localObject10 = ((m)localObject9).a();
      localn2.a(localObject10, localn1.getDouble(localObject10));
      ((m)localObject9).f();
      if ((!bool5) && (bool4)) {
        return;
      }
    } while (!bool4);
    a(parame, localq, (e[])localObject3, arrayOfe, arrayOfd1, arrayOfd2, localn2, arrayOfInt, (k)localObject6, localx2, localx3, d1, (a.c.d[][])localObject5);
    a(parame, localq, (e[])localObject3, arrayOfe, arrayOfd1, arrayOfd2, localn2, arrayOfInt, (k)localObject6, localx2, localx3);
    if (!bool5) {
      a(parame, arrayOfd1, arrayOfd2, localx1, paramo, paramrb);
    }
  }
  
  private void a(e parame, q paramq, e[] paramArrayOfe1, e[] paramArrayOfe2, a.c.d[] paramArrayOfd1, a.c.d[] paramArrayOfd2, k paramk1, int[] paramArrayOfInt, k paramk2, k paramk3, k paramk4)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    double d1 = a(parame, paramArrayOfe1, paramArrayOfe2, paramArrayOfd1, paramArrayOfd2, paramk1, paramArrayOfInt, paramk2, paramk3, paramk4);
    int n = 0;
    label239:
    do
    {
      if (n >= paramArrayOfe1.length) {
        break;
      }
      e locale1 = paramArrayOfe1[n];
      Object localObject = paramArrayOfd2[n].a(locale1);
      int i1 = n;
      do
      {
        do
        {
          if (i1 >= paramArrayOfe1.length) {
            break label239;
          }
          e locale2 = paramArrayOfe1[i1];
          e locale3 = paramArrayOfd2[i1].a(locale2);
          if (bool1) {
            break;
          }
          if (localObject != locale3)
          {
            if (bool2) {
              continue;
            }
            if (paramq.b((e)localObject, locale2))
            {
              if (bool2) {
                continue;
              }
              if (paramq.b(locale3, locale1))
              {
                a.c.d locald = paramArrayOfd2[n];
                paramArrayOfd2[n] = paramArrayOfd2[i1];
                paramArrayOfd2[i1] = locald;
                double d2 = a(parame, paramArrayOfe1, paramArrayOfe2, paramArrayOfd1, paramArrayOfd2, paramk1, paramArrayOfInt, paramk2, paramk3, paramk4);
                if (!bool2)
                {
                  if (d2 < d1)
                  {
                    d1 = d2;
                    localObject = locale3;
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {}
                  }
                  else
                  {
                    paramArrayOfd2[i1] = paramArrayOfd2[n];
                  }
                }
                else {
                  paramArrayOfd2[n] = locald;
                }
              }
            }
          }
          i1++;
        } while (!bool1);
        n++;
      } while (bool2);
    } while (!bool1);
  }
  
  private int c(int paramInt)
  {
    boolean bool = d.R;
    int n = b();
    if (!bool) {
      if (n == 0) {
        return paramInt;
      }
    }
    if (!bool) {
      if (n == 2)
      {
        if (!bool) {
          if (paramInt == 1) {
            return 2;
          }
        }
        if (!bool) {
          if (paramInt == 2) {
            return 1;
          }
        }
        if (!bool)
        {
          if (paramInt == 8) {
            return 8;
          }
          if (bool) {}
        }
        else if (paramInt == 4)
        {
          return 4;
        }
        return 255;
      }
    }
    if (!bool) {
      if (n == 1)
      {
        if (!bool) {
          if (paramInt == 1) {
            return 8;
          }
        }
        if (!bool) {
          if (paramInt == 2) {
            return 4;
          }
        }
        if (!bool)
        {
          if (paramInt == 8) {
            return 2;
          }
          if (bool) {}
        }
        else if (paramInt == 4)
        {
          return 1;
        }
        return 255;
      }
    }
    if (!bool) {
      if (paramInt == 1) {
        return 4;
      }
    }
    if (!bool) {
      if (paramInt == 2) {
        return 8;
      }
    }
    if (!bool)
    {
      if (paramInt == 8) {
        return 1;
      }
      if (bool) {}
    }
    else if (paramInt == 4)
    {
      return 2;
    }
    return 255;
  }
  
  private int c(boolean paramBoolean)
  {
    boolean bool = d.R;
    if (!bool) {
      if (paramBoolean)
      {
        if (!bool) {
          switch (b())
          {
          case 0: 
          default: 
            return 237;
          case 2: 
            return 238;
          case 1: 
            return 235;
          }
        }
        return 231;
      }
    }
    if (!bool) {
      switch (b())
      {
      case 0: 
      default: 
        return 222;
      case 2: 
        return 221;
      case 1: 
        return 215;
      }
    }
    return 219;
  }
  
  private void a(e parame, q paramq, e[] paramArrayOfe1, e[] paramArrayOfe2, a.c.d[] paramArrayOfd1, a.c.d[] paramArrayOfd2, k paramk1, int[] paramArrayOfInt, k paramk2, k paramk3, k paramk4, double paramDouble, a.c.d[][] paramArrayOfd)
  {
    boolean bool3 = d.R;
    boolean bool2 = d.Q;
    double d1 = a(parame, paramArrayOfe1, paramArrayOfe2, paramArrayOfd1, paramArrayOfd2, paramk1, paramArrayOfInt, paramk2, paramk3, paramk4);
    double d2 = d1;
    int[] arrayOfInt1 = new int[paramArrayOfInt.length];
    System.arraycopy(paramArrayOfInt, 0, arrayOfInt1, 0, paramArrayOfInt.length);
    a.c.d[] arrayOfd1 = new a.c.d[paramArrayOfd2.length];
    System.arraycopy(paramArrayOfd2, 0, arrayOfd1, 0, paramArrayOfd2.length);
    int[] arrayOfInt2 = new int[paramArrayOfInt.length];
    a.c.d[] arrayOfd2 = new a.c.d[paramArrayOfd2.length];
    wb localwb = this.v ? new wb(4242L) : new wb();
    double d3 = paramq.l();
    int n = 0;
    label132:
    break label165;
    if (n < 20) {}
    label165:
    label347:
    while (bool3)
    {
      if (bool2) {
        break label422;
      }
      if (d1 > paramDouble)
      {
        boolean bool1 = true;
        int i1 = 20 * paramq.l();
        do
        {
          if (i1 <= 0) {
            break label391;
          }
          if (bool2) {
            break;
          }
          if (d1 <= paramDouble) {
            break label391;
          }
          double d4 = d1;
          if (!bool3) {
            if (bool1)
            {
              System.arraycopy(paramArrayOfInt, 0, arrayOfInt2, 0, paramArrayOfInt.length);
              System.arraycopy(paramArrayOfd2, 0, arrayOfd2, 0, paramArrayOfd2.length);
            }
          }
          if (!bool3)
          {
            if ((bool1 = a(paramArrayOfe1, paramArrayOfd2, paramArrayOfd, paramArrayOfInt, localwb)))
            {
              d1 = a(parame, paramArrayOfe1, paramArrayOfe2, paramArrayOfd1, paramArrayOfd2, paramk1, paramArrayOfInt, paramk2, paramk3, paramk4);
              double d5 = d1 - d4;
              if (!bool3) {
                if (d5 > 0.0D)
                {
                  double d6 = 1.0D - Math.exp(-d5 / d3);
                  if (bool3) {
                    break label347;
                  }
                  if (localwb.nextDouble() < d6)
                  {
                    System.arraycopy(arrayOfInt2, 0, paramArrayOfInt, 0, paramArrayOfInt.length);
                    System.arraycopy(arrayOfd2, 0, paramArrayOfd2, 0, paramArrayOfd2.length);
                    d1 = d4;
                  }
                }
              }
              if (bool3) {
                continue;
              }
              if (d1 < d2)
              {
                d2 = d1;
                System.arraycopy(paramArrayOfInt, 0, arrayOfInt1, 0, paramArrayOfInt.length);
                System.arraycopy(paramArrayOfd2, 0, arrayOfd1, 0, paramArrayOfd2.length);
              }
            }
            i1--;
          }
        } while (!bool2);
        d3 *= 0.85D;
        n++;
        if (bool3) {
          break label132;
        }
        if (!bool2) {
          break;
        }
      }
    }
    label391:
    if (d1 > d2)
    {
      label422:
      d1 = d2;
      System.arraycopy(arrayOfInt1, 0, paramArrayOfInt, 0, paramArrayOfInt.length);
      System.arraycopy(arrayOfd1, 0, paramArrayOfd2, 0, paramArrayOfd2.length);
    }
  }
  
  private void a(e parame, a.c.d[] paramArrayOfd1, a.c.d[] paramArrayOfd2, k paramk, o paramo, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int n = 0;
    label88:
    do
    {
      if (n >= paramArrayOfd1.length) {
        break;
      }
      a.c.d locald1 = paramArrayOfd1[n];
      a.c.d locald2 = paramArrayOfd2[n];
      Object localObject = paramk.get(locald2.e());
      if (!bool2) {
        if ((localObject instanceof bd.e_))
        {
          localad = ((bd.e_)localObject).a();
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label88;
          }
        }
      }
      ad localad = (ad)localObject;
      a(paramo, locald1, localad, locald1.e().equals(parame), paramrb);
      n++;
    } while (!bool1);
  }
  
  private void a(o paramo, a.c.d paramd, ad paramad, boolean paramBoolean, rb paramrb)
  {
    boolean bool = d.R;
    if (!bool) {}
    if ((bool) || (!a(paramad, c(!paramBoolean))))
    {
      if (bool) {
        break label86;
      }
      if (!paramad.b())
      {
        if (bool) {
          break label86;
        }
        if (paramad.a() != 255) {}
      }
    }
    else
    {
      return;
    }
    paramrb.a(paramd, paramBoolean, a(paramad, paramBoolean));
    if (paramad.b())
    {
      label86:
      a.d.w localw = new a.d.w(paramad.a(b(), a()), paramad.b(b(), a()));
      if (!bool)
      {
        if (paramBoolean)
        {
          if (bool) {
            break label154;
          }
          paramo.a(paramd, localw);
        }
      }
      else if (!d.Q) {
        return;
      }
      label154:
      paramo.b(paramd, localw);
    }
  }
  
  private cd a(ad paramad, boolean paramBoolean)
  {
    boolean bool = d.R;
    if (!bool) {}
    int n = paramBoolean ? a(1, 2, 1, 8, 4, 2, paramad) : a(1, 1, 2, 8, 4, 1, paramad);
    if (!bool) {
      switch (n)
      {
      case 0: 
      default: 
        return cd.a((byte)1, paramad.b());
      case 1: 
        return cd.a((byte)4, paramad.b());
      case 2: 
        return cd.a((byte)2, paramad.b());
      }
    }
    return cd.a((byte)8, paramad.b());
  }
  
  private cd a(ad paramad, boolean paramBoolean1, boolean paramBoolean2)
  {
    boolean bool = d.R;
    if (!bool) {}
    int n = paramBoolean1 ? a(1, 2, 1, 8, 4, 2, paramad) : a(1, 1, 2, 8, 4, 1, paramad);
    if (!bool) {
      switch (n)
      {
      case 0: 
      default: 
        if (paramBoolean2) {
          return m;
        }
        return i;
      case 1: 
        if (paramBoolean2) {
          return p;
        }
        return k;
      case 2: 
        if (paramBoolean2) {
          return l;
        }
        return h;
      }
    }
    if (paramBoolean2) {
      return o;
    }
    return j;
  }
  
  private static boolean a(e[] paramArrayOfe, a.c.d[] paramArrayOfd, a.c.d[][] paramArrayOfd1, int[] paramArrayOfInt, wb paramwb)
  {
    boolean bool3 = d.R;
    boolean bool2 = d.Q;
    boolean bool1 = false;
    int n = 0;
    do
    {
      if (n >= paramArrayOfe.length) {
        break;
      }
      int i1 = paramArrayOfd1[n].length;
      if ((!bool3) && (bool2)) {
        break label129;
      }
      if (i1 > 1)
      {
        int i2 = paramwb.nextInt(i1);
        a.c.d locald1 = paramArrayOfd1[n][i2];
        a.c.d locald2 = paramArrayOfd[n];
        if (bool3) {
          continue;
        }
        if (locald2 != locald1)
        {
          bool1 = true;
          paramArrayOfInt[locald2.e().f()] -= 1;
          paramArrayOfd[n] = locald1;
          paramArrayOfInt[locald1.e().f()] += 1;
        }
      }
      n++;
    } while (!bool2);
    label129:
    return bool1;
  }
  
  private double a(e parame, e[] paramArrayOfe1, e[] paramArrayOfe2, a.c.d[] paramArrayOfd1, a.c.d[] paramArrayOfd2, k paramk1, int[] paramArrayOfInt, k paramk2, k paramk3, k paramk4)
  {
    boolean bool4 = d.R;
    boolean bool3 = d.Q;
    int n = c(true);
    int i1 = c(false);
    double d = 0.0D;
    int i2 = 0;
    Object localObject;
    int i3;
    label272:
    label358:
    do
    {
      do
      {
        if (i2 >= paramArrayOfe1.length) {
          break;
        }
        localObject = paramArrayOfd2[i2];
        d += paramk1.getDouble(localObject);
        if (bool3) {
          break label470;
        }
        i3 = paramArrayOfd1[i2].f() == parame ? 1 : 0;
        ad localad1 = (ad)paramk3.get(((a.c.d)localObject).e());
        if ((bool4) || (!a(localad1, n)))
        {
          int i4 = 0;
          int i5 = i2 + 1;
          do
          {
            if (i5 >= paramArrayOfe1.length) {
              break label425;
            }
            if (bool3) {
              break;
            }
            int i6 = paramArrayOfd1[i5].f() == parame ? 1 : 0;
            ad localad2 = (ad)paramk3.get(paramArrayOfd2[i5].e());
            if ((bool4) || (!a(localad2, i1)))
            {
              int i7 = l.a(paramk4.getInt(((a.c.d)localObject).e()), paramk4.getInt(paramArrayOfd2[i5].e()));
              if (!bool4) {
                if (i3 == 0)
                {
                  if (bool4) {
                    break label272;
                  }
                  if (i6 == 0)
                  {
                    if (bool4) {
                      continue;
                    }
                    if (i7 <= 0) {
                      break label417;
                    }
                    i4++;
                    if (bool4) {
                      continue;
                    }
                    if (!bool3) {
                      break label417;
                    }
                  }
                }
              }
              if (!bool4) {
                if (i3 != 0)
                {
                  if (bool4) {
                    break label358;
                  }
                  if (i6 == 0)
                  {
                    if (!bool4) {
                      if (!localad1.a(8))
                      {
                        if (bool4) {
                          continue;
                        }
                        if (i7 <= 0) {
                          break label417;
                        }
                        i4++;
                        if (bool4) {
                          continue;
                        }
                        if (!bool3) {
                          break label417;
                        }
                      }
                    }
                    if (bool4) {
                      continue;
                    }
                    if (i7 >= 0) {
                      break label417;
                    }
                    i4++;
                    if (bool4) {
                      continue;
                    }
                    if (!bool3) {
                      break label417;
                    }
                  }
                }
              }
              boolean bool1 = localad1.a(8);
              boolean bool2 = localad2.a(8);
              if (!bool4) {
                if (bool1 != bool2)
                {
                  if (bool4) {
                    continue;
                  }
                  if (i7 >= 0) {
                    break label417;
                  }
                  i4++;
                  if (bool4) {
                    continue;
                  }
                  if (!bool3) {
                    break label417;
                  }
                }
              }
              if (bool4) {
                continue;
              }
              if (i7 > 0) {
                i4++;
              }
            }
            i5++;
          } while (!bool3);
          if (bool4) {
            break label525;
          }
          d += this.r * i4;
        }
        i2++;
      } while (!bool3);
    } while (bool4);
    label417:
    label425:
    i2 = 0;
    label470:
    do
    {
      if (i2 >= paramArrayOfe2.length) {
        break;
      }
      localObject = paramArrayOfe2[i2];
      i3 = paramArrayOfInt[localObject.f()] - paramk2.getInt(localObject);
      if (!bool4)
      {
        if (i3 > 0) {
          d += i3 * this.t;
        }
        i2++;
      }
    } while (!bool3);
    label525:
    return d;
  }
  
  private static boolean a(ad paramad, int paramInt)
  {
    boolean bool = d.R;
    if ((bool) || (!paramad.b())) {
      if (bool) {}
    }
    return paramad.a() == paramInt;
  }
  
  final int a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, ad paramad)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int n = 0;
    int i1 = paramad.b(b());
    if (!bool2) {
      switch (i1)
      {
      case 255: 
        i1 = paramInt6;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 32: 
        i1 = paramInt3;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 16: 
        i1 = paramInt2;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 128: 
        i1 = paramInt4;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 64: 
        i1 = paramInt5;
      }
    }
    if (!bool2)
    {
      switch (i1)
      {
      case 1: 
        n = 0;
        if (bool2) {
          break label238;
        }
        if (!bool1) {
          break;
        }
      case 4: 
        n = 1;
        if (bool2) {
          break label238;
        }
        if (!bool1) {
          break;
        }
      case 2: 
        n = 2;
        if (bool2) {
          break label238;
        }
        if (!bool1) {
          break;
        }
      case 8: 
        n = 3;
      }
      i1 = 0;
    }
    label238:
    int i2 = paramInt1;
    if (!bool2) {
      switch (i2)
      {
      case 255: 
        i2 = paramInt6;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 32: 
        i2 = paramInt3;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 16: 
        i2 = paramInt2;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 128: 
        i2 = paramInt4;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 64: 
        i2 = paramInt5;
      }
    }
    if (!bool2) {
      switch (i2)
      {
      case 1: 
        i1 = 0;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 4: 
        i1 = 1;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 2: 
        i1 = 2;
        if (!bool2) {
          if (!bool1) {
            break;
          }
        }
        break;
      case 8: 
        i1 = 3;
      }
    }
    if (!bool2) {
      if (n < i1) {
        n += 4;
      }
    }
    return n - i1;
  }
  
  class c_
    extends g.b_
  {
    private final k b;
    
    c_(k paramk)
    {
      super(0);
      this.b = paramk;
    }
    
    private ad a(e parame)
    {
      Object localObject = this.b.get(parame);
      if (!d.R) {
        if ((localObject instanceof bd.e_)) {
          return ((bd.e_)localObject).a();
        }
      }
      return (ad)localObject;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      ad localad1 = a((e)paramObject1);
      ad localad2 = a((e)paramObject2);
      if (localad1 == localad2) {
        return 0;
      }
      int i = g.this.a(1, 2, 1, 4, 8, 2, localad1);
      int j = g.this.a(1, 2, 1, 4, 8, 2, localad2);
      if (!d.R) {
        if (i != j) {
          return l.a(i, j);
        }
      }
      return a(localad1, localad2, i);
    }
  }
  
  class b_
    implements Comparator
  {
    private final int a;
    
    b_(int paramInt)
    {
      this.a = paramInt;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      return a((ad)paramObject1, (ad)paramObject2, this.a);
    }
    
    int a(ad paramad1, ad paramad2, int paramInt)
    {
      boolean bool = d.R;
      if (!bool) {
        if (paramad1 == paramad2) {
          return 0;
        }
      }
      if (!bool) {
        if (paramad1.b())
        {
          if (bool) {
            break label180;
          }
          if (paramad2.b())
          {
            byte b = g.this.b();
            int i = g.this.a();
            if (!bool) {
              switch (paramInt)
              {
              case 0: 
                return l.a(paramad1.a(b, i), paramad2.a(b, i));
              case 1: 
                return l.a(paramad1.b(b, i), paramad2.b(b, i));
              case 2: 
              default: 
                return l.a(paramad2.a(b, i), paramad1.a(b, i));
              }
            }
            return l.a(paramad2.b(b, i), paramad1.b(b, i));
          }
        }
      }
      label180:
      if (!bool) {
        if (paramad1.b()) {
          return -1;
        }
      }
      if (!bool) {
        if (paramad2.b()) {
          return 1;
        }
      }
      return 0;
    }
  }
  
  private static class d_
    implements Comparator
  {
    private final e a;
    private final bc c;
    
    private d_(e parame, bc parambc)
    {
      this.a = parame;
      this.c = parambc;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool3 = d.R;
      a.c.d locald1 = (a.c.d)paramObject1;
      y localy1 = this.c.a(locald1);
      boolean bool1 = g.a(locald1.e().equals(this.a) ? localy1.d() : localy1.f());
      a.c.d locald2 = (a.c.d)paramObject2;
      y localy2 = this.c.a(locald2);
      boolean bool2 = g.a(locald2.e().equals(this.a) ? localy2.d() : localy2.f());
      if (!bool3) {
        if (bool1)
        {
          if (bool3) {
            break label138;
          }
          if (!bool2) {
            return -1;
          }
        }
      }
      label138:
      if (!bool3) {
        if (!bool1)
        {
          if (bool3) {
            break label159;
          }
          if (bool2) {
            return 1;
          }
        }
      }
      label159:
      return 0;
    }
    
    d_(e parame, bc parambc, g.0 param0)
    {
      this(parame, parambc);
    }
  }
  
  static class e_
  {
    final ad a;
    
    private e_(ad paramad)
    {
      this.a = paramad;
    }
    
    public boolean equals(Object paramObject)
    {
      boolean bool = d.R;
      if (!bool) {
        if (this == paramObject) {
          return true;
        }
      }
      if (paramObject != null)
      {
        if (bool) {
          break label37;
        }
        if (getClass() == paramObject.getClass()) {}
      }
      else
      {
        return false;
      }
      label37:
      return this.a == ((e_)paramObject).a;
    }
    
    public int hashCode()
    {
      return this.a.hashCode();
    }
    
    static e_ a(ad paramad)
    {
      return new e_(paramad);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.g

 * JD-Core Version:    0.7.0.1

 */